<script lang="ts">
import { defineComponent } from "vue";
import { useRoute, useRouter } from "vue-router";
export default defineComponent({
  name: "Dashboard",
  setup() {
    const route = useRoute();
    const router = useRouter();
    const login = () => {
      console.log("登录");
      router.push("/login");
    };
    return {
      login,
    };
  },
});
</script>

<template>
  <div>
    <a-button type="primary" @click="login">login</a-button>
  </div>
</template>

<style scoped>
</style>
